<template>

  <div style="width:100%; padding:10px;">
    <br><br><br><br>
    <p style="text-align: center; margin:auto; padding: 20px 50px 20px 0px;">
      <span style="font-size:26px; font-weight:700;">东莞市厚街医院</span>
      <br>
      <span style="font-size:26px; font-weight:700;">临床取血凭证</span>
    </p>
    <table style="border-collapse: collapse; width:90%; left:20px;position:relative;">
      <tr>
        <td style="">申请单号：{{item.billNo}}</td>
        <td style="text-align: right;">打印时间：{{item.printTime}}</td>
      </tr>
    </table>
    <table style="border-collapse: collapse; width:90%; left:20px; position:relative; margin-top:10px;">
      <tr>
        <td colspan="4" style="font-weight:600;border:1px solid black;border-width:1px 0 0 0;">患者信息：</td>
      </tr>
      <tr>
        <td style="">姓名：{{item.name}}</td>
        <td style="">性别：{{getEnum("BasSex",item.sex)}}</td>
        <td style="">年龄：{{item.age}}</td>
      <tr>
        <td style="">住院号/ID号：{{item.hospitalNumber}}</td>
        <td style=" ">科室：{{getBasMaterial("Department",item.basDepartmentId)}}</td>
        <td style=" ">床位号：{{item.berth}}</td>
      </tr>
      <tr>
        <td style="">患者ABO：{{item.patientABO}}</td>
        <td style="">患者Rh(D)：{{item.patientRhD}}</td>
        <td style="">临床诊断：{{item.clinicDiagnose}}</td>
      </tr>
    </table>
    <table style="border-collapse: collapse; width:90%; left:20px; position:relative; margin-top:10px;">
      <tr>
        <td colspan="4" style="font-weight:600;border:1px solid black;border-width:1px 0 0 0;">取血信息：</td>
      </tr>
      <tr>
        <td style="">血液品种：{{list[0].basBloodVarietyName}}</td>
        <td style="">血型：{{list[0].bloodABO}}, {{list[0].patientRhD}}</td>
        <td style="">本次取血量：{{list[0].applySum}}{{list[0].unit}}</td>
      </tr>
      <tr style="height:50px;">
      </tr>
      <tr>
        <td style="border:1px solid black;border-width:1px 0 0 0;">
          申请医生：{{getUserName(item.creatorUserId)}}
        </td>
        <td style="border:1px solid black;border-width:1px 0 0 0;">
          取血者：</td>
        <td style="border:1px solid black;border-width:1px 0 0 0;">
          发血者：</td>
        <td style="border:1px solid black;border-width:1px 0 0 0;">
          取血时间：</td>
      </tr>
    </table>
  </div>

</template>

<script>
export default {
  name: 'NursingPrint',
  methods: {
    //getBasMaterial(UserId)  //根据用户ID获取用户名
    getUserName() {
      return 'username'
    },

    getIsEnabled() {
      return '启用'
    },

    //getEnum("BasSex",id) //获取枚举名称
    getEnum() {
      return '未知'
    },

    //getBasMaterial("Department",id) //获取部门
    //getBasMaterial("BloodVariety",id) //获取血液品种名称
    //getBasMaterial("BloodVariety",id) //获取血液产品名称
    getBasMaterial() {
      return 'xxx'
    }
  },
  data: function() {
    return {
      item: {
        patientABO: 'A',
        patientRhD: '+',
        name: '蒲德元',
        sex: 1,
        age: '47岁',
        billNo: 'APL200811001',
        hospitalNumber: '72015942',
        berth: '15',
        basDepartmentId: '610101',
        printTime: '2020-08-19 14:14:39',
        clinicDiagnose: '急性心肌梗死',
        creatorUserId: 130,
        applySum: 3,
        hasSum: 4.5,
        bloodOutSum: 4.5
      },
      name: '取血凭证打印',
      list: [{ basBloodVarietyName: '去白细胞悬浮红细胞', patientRhD: '+', bloodABO: 'A', applySum: 4.5, unit: 'u' }],
      record: {
        creatorUserId: 2,
        getUserId: 929,
        doctorUserId: 130,
        getTime: 10,
        getSum: 4.5,
        traApplyBillNo: 'APL200811001',
        userName: 'LSS',
        name: '李珊珊',
        getUserName: '李珊珊'
      }
    }
  }
}
</script>
